package com.design.pattern.structural.adapter.example;

/**
 * 认认真真写写
 * User: RenQiQiqng
 * Date: 2019/3/10-Time: 23:44
 * Description:
 */
public class PowerAdapter implements DC5 {

    private AC200 ac200 = new AC200();

    @Override
    public double outputDC5V(double output) {
        double adapterInput = ac200.outputAC220V(output);
        //变压器
        double adapterOutput = adapterInput / 44;
        System.out.println("使用电源适配器输入AC:" + adapterInput + "输出DC:" + adapterOutput);
        return adapterOutput;
    }
}
